﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

namespace JeanFish.Common.Configuration
{
    public class CommonConfigurationSection:ConfigurationSection
    {
        private const string nameProperty = "name";
        private const string defaultProperty = "default";
        private const string exceptionHelperProperty = "Exception";
        [ConfigurationProperty(nameProperty, IsRequired = false, DefaultValue = "JeanFish.Common")]
        [StringValidator(MinLength = 1)]
        public string Name
        {
            get { return (string)this[nameProperty]; }
            set { this[nameProperty] = value; }
        }
        [ConfigurationProperty(defaultProperty,DefaultValue=true,IsRequired=false)]
        public bool Default
        {
            get { return (bool)this[defaultProperty]; }
            set { this[defaultProperty] = value; }
        }

    }
}
